<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML >

<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>项目管理系统-成员</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
	<script src="../../jquery-1.7.2.js"></script>
	<script src="../../ui/jquery.ui.core.js"></script>
	<script src="../../ui/jquery.ui.widget.js"></script>
	<script src="js/jquery.ui.datepicker.js"></script>
	<link rel="stylesheet" href="../demos.css">








<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/jQuery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<style type="text/css">
body {
	padding-top: 40px;
	background-color: #3D71BC;
	background-image: url("img/pro-bg1.jpg");
	background-repeat: no-repeat;
	width: 1005px;
}

.body-bgc {
	margin-top: 30px;
	padding-top: 20px;
	background-color: #bod4e5;
	background: url("img/wash-white-30.png") repeat scroll 0 0 transparent;
}

.con {
	margin-left: 100px;
}

.con-foot {
	margin: 25px 100px;;
}
</style>

</head>
<body>
	<%@ include file="include/topbar.jsp"%>

	<!--网页正文-->


	<div class="container well body-bgc">

		<div>
			<h3>添加一个新任务</h3>
		</div>
		<hr />
		<!-- 下半部分 -->
		<div class="span6 con">

			<form action="addtask.action" method="post">
				<input type="hidden" name="id" value="${id }" /> <label>
					任务名称 </label> <input type="text" class="input-xlarge span5"
					name="task.name" />


				<div class="demo">
					<label for="from">From</label> <input id="from"
						class="hasDatepicker" type="text" name="from"> <label
						for="to">to</label> <input id="to" class="hasDatepicker"
						type="text" name="to">
				</div>



				<%--<label> 开始时间 </label> <input type="text"
					class="input-xlarge span5" name="task.begintime" /> <label>
					结束时间 </label> <input type="text" class="input-xlarge span5"
					name="task.endtime" /> 
				--%>
				<label> 任务描述 </label>
				<textarea rows="3" class="input-xlarge span5" cols=""
					name="task.content"></textarea>
				<label> 状态 </label> <select class="span3" name="task.state">
					<option>新任务</option>
					<option>进行中</option>
					<option>已完成</option>
				</select> <label> 级别 </label> <select class="span3" name="task.level">
					<option>重要紧急</option>
					<option>重要不紧急</option>
					<option>不重要紧急</option>
					<option>不重要不紧急</option>

				</select> <label> 负责人 </label> <select class="span3" name="username">

					<c:forEach var="user" items="${userList }">
						<option>${user.username}</option>
					</c:forEach>
				</select>

				<div class="con-foot ">
					<a href="task.action?id=${id }" class="btn ">返回</a>
					<button type="submit" class="btn btn-success"
						style="margin-left: 50px;">
						<i class="icon-th-large icon-white"></i>建立新任务
					</button>
				</div>
			</form>

		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			$("input[name='task.name']").popover({
				title : "信息提示",
				content : "任务名称不能为空",
				trigger : "manual"
			});

			$("textarea").popover({
				title : "信息提示",
				content : "任务描述不能为空",
				trigger : "manual"
			});

			$("input[name='task.name']").click(function() {
				$(this).popover("hide");
			});

			$("textarea").click(function() {
				$(this).popover("hide");
			});
			$("button").click(function() {
				if ($("input[name='task.name']").val() == "") {
					$("input[name='task.name']").popover("show");
					return false;
				}

				if ($("textarea").val() == "") {
					$("textarea").popover("show");
					return false;
				}

				$("form").submit();

			});

		});
	</script>

</body>
</html>

